﻿<%@ 
	Page
	Title="Home Page" 
	Language="C#" 
	MasterPageFile="~/Site.master" 
	AutoEventWireup="true"
	CodeBehind="Default.aspx.cs" 
	Inherits="EyeOpen.CascadingDropDown.Web.Default" 
%>
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
	<asp:SqlDataSource 
		Id="customerSqlDataSource" 
		runat="server" 
		ConnectionString="<%$ ConnectionStrings:FooConnectionString %>"				
		SelectCommand="SELECT Customer.Id, Customer.Name, City.Name AS City, Town.Name AS Town FROM Customer INNER JOIN Town ON Customer.TownId = Town.Id INNER JOIN City ON Town.CityId = City.Id ORDER BY Customer.Name">
	</asp:SqlDataSource>
	<asp:Repeater runat="server" DataSourceID="customerSqlDataSource">
		<ItemTemplate>
			<span class="fieldName">Name</span>
			<span runat="server"><%# Eval("Name") %></span>
			<br />
			<span class="fieldName">City</span>
			<span runat="server"><%# Eval("City") %></span>
			<br />
			<span class="fieldName">Town</span>
			<span runat="server"><%# Eval("Town") %></span>
			<br />
			<a href="<%# ResolveUrl(string.Format("~/edit.aspx?id={0}", Eval("Id"))) %>">Edit</a>
			<br />
			<br />
		</ItemTemplate>
	</asp:Repeater>
</asp:Content>